package com.video.service.impl;

import com.video.dao.CourseMapper;
import com.video.dao.SubjectMapper;
import com.video.entity.Course;
import com.video.service.CourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CourseServiceImpl implements CourseService {

    @Autowired
    private SubjectMapper subjectMapper;

    @Autowired
    private CourseMapper courseMapper;

    @Override
    public List<Course> findAll() {
        return courseMapper.selectByExample(null);
    }

    @Override
    public Course findCourseBySName(String subjectName) {
        Course course = courseMapper.findCourseBySName(subjectName);
        return null;
    }

    @Override
    public Course findCourseById(Integer courseId) {
        return courseMapper.selectById(courseId);
    }
}
